package parkingManage;

import java.util.Scanner;

import Util.TestUtil;
import parkingManage.utils.CarUtils;
import parkingManage.utils.ParkingUtils;
import parkingManage.utils.RecordUtils;

public class ParkingTest {

	static Scanner sc = new Scanner(System.in);

	public void home() {

		CarUtils car = new CarUtils();
		ParkingUtils park = new ParkingUtils();
		RecordUtils record = new RecordUtils();

		while (true) {
			System.out.println("===================================");
			System.out.println("请选择：");
			System.out.println("1-车辆管理");
			System.out.println("2-车位管理");
			System.out.println("3-停车记录管理");
			System.out.println("4-停车");
			System.out.println("5-取车");
			System.out.println("6-退出");
			System.out.println("===================================");

			int key = TestUtil.abnormal();
			if (key == 6)
				break;

			switch (key) {
			case 1:
				car.start();
				break;
			case 2:
				park.start();
				break;
			case 3:
				record.start();
				break;
			case 4:
				car.addCar();
				break;
			case 5:
				record.pickup();
				break;
			default:
				break;
			}
			System.out.println("点击回车继续...");
			sc.nextLine();
		}
	}

	public static void main(String[] args) {
		ParkingTest parkingTest = new ParkingTest();
		parkingTest.home();
	}
}
